package com.am.mosl.cityandroid.parser;

import com.alibaba.fastjson.JSON;
import com.am.mosl.cityandroid.bean.ArticleDetail;
import com.am.mosl.cityandroid.bean.CityList;
import com.am.mosl.cityandroid.bean.Column;

import java.util.List;

/**
 * Created by mosl on 14-7-4.
 */
public class JSONParser {


    public static  List<Column> getListColumn(String json){

        return JSON.parseArray(json, Column.class);
    }


    public static List<CityList> getCityList(String json){
        return JSON.parseArray(json,CityList.class);

    }

    public static ArticleDetail getArticle(String json){
        return JSON.parseObject(json,ArticleDetail.class);
    }
}
